def fun(s,ch):
    i=0
    for item in s:
        if ch==item:
            i+=1
    print(i)
if __name__ == '__main__':
    ch=input('请输入需要查询的字符')
    s=input('请输入被查询的字符串')
    fun(s,ch)
